//
//  TextButton.m
//  LabanBrowser
//
//  Created by Xh2 on 3/26/13.
//  Copyright (c) 2013 VNG. All rights reserved.
//

#import "TextButton.h"

@implementation TextButton
@synthesize delegate;
@synthesize menuOption;
- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        self=[[[NSBundle mainBundle]loadNibNamed:@"TextButton" owner:self options:nil]objectAtIndex:0];
        //self.layer.borderWidth=1;
        //self.layer.borderColor=[[UIColor blackColor]CGColor];
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

- (IBAction)onClick:(id)sender {
    [self setSelected:YES];
    if(delegate && [delegate respondsToSelector:@selector(onClickTextButton:)]){
        [delegate onClickTextButton:self];
    }
}
@end
